package com.caine.common.tool;

/**
 * @Author: CaineZhu
 * @Description:
 * @Date: Created in 18:58 2021/1/7
 * @Modified By:
 */
public class StringTool {

    //字符是否为空
    public static boolean isEmptyOrNull(Object val) {
        if (null == val || val.toString().trim().equalsIgnoreCase("")) {
            return true;
        }
        return false;
    }

    //字符是否为空
    public static boolean isNotEmptyOrNull(Object... val) {
        if (val == null || val.length == 0) {
            return true;
        }
        for (Object obj : val) {
            if (isEmptyOrNull(obj)) {
                return false;
            }
        }
        return true;
    }

    //字符是否不为空
    public static boolean isNotEmpty(Object val) {
        return !isEmptyOrNull(val);
    }
}
